<?php



class Admin_Home_Controller extends Admin_Controller {

	public $restful = true;

	public function __construct()
	{
		parent::__construct();
		//--Your Code --//
		$this->theme->set_theme("admin") ;
	}


	public function get_index(){

        if(!Users::isAdmin()) return Redirect:: to('admin/login');

			$data['users'] = Users::count();
			$data['categories'] = Categories::count();
			$data['locations'] = Locations::count();
			$data['post'] = Post::count();
			$data['review'] = Comments::count();

			$this->theme->title("Welcome");
			return $this->theme->render('admin::index',$data);

	}
}

